package com.hengpeng.itfints.service.impl;

import org.springframework.stereotype.Service;

import com.hengpeng.itfinbase.constants.SystemConfigConstants;
import com.hengpeng.itfinbase.persist.Partner;
import com.hengpeng.itfinbase.persist.Partner.PartnerType;
import com.hengpeng.itfints.constants.SystemConfigUtil;
import com.hengpeng.itfints.service.BaseService;
import com.hengpeng.itfints.service.CommonService;

/**
 * <pre>
 * 公共方法
 * </pre>
 * @author shanguogang
 * @version 1.0, 2015-8-7
 */
@Service
public class CommonServiceImpl extends BaseService implements CommonService
{

	@Override
	public Boolean isTrustPattern() throws Exception
	{
		Partner partner = serviceFactory.getPersistService().get(Partner.class,
				SystemConfigUtil.getConfigValue(SystemConfigConstants.PARTNER_ID));
		if (partner != null && !partner.getPartnerType().equals(PartnerType.FUND))
		{
			return true;
		}else{
			return false;
		}
	}

}
